 
<header id="header" class="mui-bar mui-bar-black mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left" href="{:url('user/index')}"> </a>
    <h1 class="mui-title">财务报表</h1>
</header>

<div class="mui-content mui-content-my finance-msg" style="margin-top: 3.5em;padding-top: 0">
    <div class="search" id="showUserPicker">
        <p><span id="userResult">{$building_name}</span><i class="mui-icon mui-icon-arrowdown"></i></p>
    </div>
    <div class="finance-type">
        <div class="finance-type-active"><a href="#">按工地</a></div>
        <div><a href="#">按公司</a></div>
    </div>
    <div class="finance-msg-top">
        <div>
            <img src="__CDN__/style/images/zhichu1.png" alt="">支出 <b>¥{$zcsum}</b>
        </div>
        <div>
            <img src="__CDN__/style/images/shouru1.png" alt="">收入 <b>¥{$srsum}</b>
        </div>
    </div>
    <div class="finance-msg-con">
        <ul>
{volist name="result.rows" id="vv"}  
            <li class="<?php if($vv['apply_type'] ==2){echo 'zhichu'; }else{echo 'shouru';} ?>">
                <div class="finance-msg-con-left">
                    <h2>{$vv.parent_code}</h2>
                    <p><span>{$vv.code}</span> <?php echo date("Y-m-d",$vv['apply_time'])?></p>
                </div>
                <div class="finance-msg-con-right">
                    <?php if($vv['apply_type'] ==2){echo '-'; }else{echo '+';} ?>{$vv.amount}
                </div>
            </li>
 {/volist} 
 
        </ul>
    </div>
</div>

<script src="__CDN__/style/js/jquery-1.11.3.js"></script>
<script src="__CDN__/style/js/mui.poppicker.js"></script>
<script src="__CDN__/style/js/mui.picker.min.js"></script>
<script>
    (function ($,doc) {
        var userPicker = new $.PopPicker();
        userPicker.setData({$siteList});
        var showUserPickerButton = doc.getElementById('showUserPicker');
        var userResult = doc.getElementById('userResult');
        showUserPickerButton.addEventListener('tap', function(event) {
            userPicker.show(function(items) {
                var rul= JSON.stringify(items[0].value);
                location.href="/index/finance/finance_list/site_id/"+rul+".html";
                // var rula=rul.replace('"','').replace('"','');
                // userResult.innerHTML = rula;
                //返回 false 可以阻止选择框的关闭
                //return false;
            });
        }, false);
    })(mui,document);
</script>
 